<input type="hidden" class="tpl-form-input" id="user-id" name="user.id" value="#(user.id??)">
<div class="am-form-group">
    <label class="am-u-sm-3 am-form-label">头像 <span class="tpl-form-line-small-title">avatar</span></label>
    <div class="am-u-sm-9">
        <div class="am-form-group am-form-file">
            <img class="am-circle" alt="点击图片上传" id="up-avatar-touch" onerror="this.src='/admin/common/AmazeUI/img/user05.png'" src="#(user.avatar??)" data-am-popover="{content: '点击上传', trigger: 'hover focus'}" >
            <input type="hidden" class="tpl-form-input" id="avatar-save-path" name="user.avatar" value="#(user.avatar??)" />
        </div>
    </div>
</div>
<div class="am-form-group">
    <label for="user-account" class="am-u-sm-3 am-form-label">账号 <span class="tpl-form-line-small-title">account</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="tpl-form-input" id="user-account" name="user.account" value="#(user.account??)" placeholder="请输入账号">
        <small>#(accountMsg)</small>
    </div>
</div>

<div class="am-form-group">
    <label for="user-name" class="am-u-sm-3 am-form-label">姓名 <span class="tpl-form-line-small-title">name</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="tpl-form-input" id="user-name" name="user.name" value="#(user.name??)" placeholder="请输入姓名">
        <small></small>
    </div>
</div>

<div class="am-form-group">
    <label for="user-email" class="am-u-sm-3 am-form-label">邮箱 <span class="tpl-form-line-small-title">email</span></label>
    <div class="am-u-sm-9">
        <input type="text" class="tpl-form-input" id="user-email" name="user.email" value="#(user.email??)" placeholder="请输入邮箱">
        <small></small>
    </div>
</div>

<div class="am-form-group">
    <label for="user-role" class="am-u-sm-3 am-form-label">角色 <span class="tpl-form-line-small-title">role</span></label>
    <div class="am-u-sm-9">
        #if(user && user.role && user.role == 1)
            #(user.roleName)
            <input type="hidden" class="tpl-form-input" id="user-role" name="user.role" value="#(user.role??)">
        #else
            <select id="user-role" name="user.role" data-am-selected="{searchBox: 0}" style="display: none;">
                #for(r:roleList)
                <option value="#(r.id)">#(r.name)</option>
                #end
            </select>
        #end
    </div>
</div>

<div class="am-form-group">
    <label for="user-is-show" class="am-u-sm-3 am-form-label">是否展示 <span class="tpl-form-line-small-title">show</span></label>
    <div class="am-u-sm-9">
        <input type="hidden" class="tpl-form-input" id="user-is-show" name="user.is_show" value="#(user.isShow??)">

        <div class="tpl-switch">
            <input type="checkbox" #(user.isShow?'checked':'') id="check-show" class="ios-switch bigswitch tpl-switch-btn" >
            <div class="tpl-switch-btn-view">
                <div>
                </div>
            </div>
        </div>
        <script>
            $(function () {
                if($('#user-is-show').val() == '')
                    $('#user-is-show').val(false);
                $('#check-show').click(function () {
                    if($('#check-show').is(':checked'))
                        $('#user-is-show').val(true);
                    else
                        $('#user-is-show').val(false);
                })
            });
        </script>
    </div>
</div>

<div class="am-form-group">
    <label for="user-info" class="am-u-sm-3 am-form-label">简介</label>
    <div class="am-u-sm-9">
        <textarea class="" rows="10" id="user-info" name="user.info" placeholder="请输入简介">#(user.info??)</textarea>
    </div>
</div>

<div class="am-form-group">
    <label for="user-sort" class="am-u-sm-3 am-form-label">排序 <span class="tpl-form-line-small-title">sort</span></label>
    <div class="am-u-sm-9">
        <input type="number" class="tpl-form-input" id="user-sort" name="user.sort" value="#(user.sort??)" placeholder="请输入排序">
    </div>
</div>
<div class="am-form-group">
    <div class="am-u-sm-9 am-u-sm-push-3">
        <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
    </div>
</div>